/*
 * 程序改错v1.0（7分）
 */

#include<stdio.h>

int main() {
	setbuf(stdout, NULL);

	int score, get_scanf_return;
	char grade;

	printf("Please input score:\n");
	get_scanf_return = scanf("%d", &score);

	if (get_scanf_return != 1 || score < 0 || score > 100) {
		printf("Input error!\n");
		return -2;
	} else if (score >= 90) {
		grade = 'A';
	} else if (score >= 80) {
		grade = 'B';
	} else if (score >= 70) {
		grade = 'C';
	} else if (score >= 60) {
		grade = 'D';
	} else {
		grade = 'E';
	}

	printf("grade: %c\n", grade);

	return 0;
}